/**
 * @file mRjson.c
 * @Synopsis  简易json解析库
 * @author Wang Jiancong
 * @version v0.1
 * @date 2022-09-12
 */

#include <stdio.h>
#include "mRjson.h"


char json[] = "{\"size\":1,\"str\":\"hello\",\"double\":3.14}";

char ss[100] = "nihao";

int main(void)
{
	int tmp;
	double ftmp;
	printf("json: %s\r\n\r\n",json);

	mRjson_Decode("%J%I%T%R",json,"size","D",&tmp);
	printf("res 1: %d\r\n", tmp);

	mRjson_Decode("%J%I%T%R",json,"str","S",&ss[0]);
	printf("res 2: %s\r\n", ss);

	mRjson_Decode("%J%I%T%R",json,"double","F",&ftmp);
	printf("res 3: %f\r\n", ftmp);

	printf("json: %s\r\n\r\n",json);
	return 0;
}







